package com.csdn.blog.xzknet.study.jvm.eg2_4_1;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * VM Args: -Xms20 -Xmx20m -XX:+HeapDumpOnOutOfMemoryError
 * 
 * @author Ken
 *
 */
public class HeapOOM {
	static class OOMObject {
	}

	public static void main(String[] args) {
		List<OOMObject> list = new ArrayList<OOMObject>();
//		HashMap h = HashMap::new;
		while (true) {
			list.add(new OOMObject());
		}
	}

}
